package cn.bitkit.component.validate;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import cn.bitkit.base.dictionary.BaseDictionary;
import cn.bitkit.tools.data.CheckType;
import jakarta.validation.Constraint;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CheckTagValidator.class)
public @interface CheckTag {

    boolean require() default false;

    int max() default Integer.MAX_VALUE;

    CheckType[] type() default {};

    String regex() default "";

    Class<? extends BaseDictionary>[] dictClass() default {};
}

